#include <linux/interrupt.h>
#include <linux/module.h>

static void my_softirq_handler(struct softirq_action *a) {
	    printk(KERN_INFO "My softirq executed!\n");
}

static int __init my_init(void) {
	    open_softirq(MY_SOFTIRQ, my_softirq_handler);  // MY_SOFTIRQ需自定义编号
	        raise_softirq(MY_SOFTIRQ);  // 触发软中断
		    return 0;
}

static void __exit my_exit(void) {
	    printk(KERN_INFO "Module unloaded.\n");
}

module_init(my_init);
module_exit(my_exit);
MODULE_LICENSE("GPL");
